package com.chenliang.time;

import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * @program: springboot_all
 * @description:
 * @author: 陈亮
 * @create: 2022-05-05 13:23
 */
public class Demo {


    public static void main(String[] args) {




        String dateStr = "2022-04-15 00:00:00";
        Date date = DateUtil.parse(dateStr, "yyyy-MM-dd HH:mm:ss");

        System.out.println(date.getTime()/1000);


        String dateStr1 = "2022-05-05 00:00:00";
        Date date1 = DateUtil.parse(dateStr1, "yyyy-MM-dd HH:mm:ss");

        System.out.println(date1.getTime()/1000);

    }
}
